```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kafka消息传递机制详解</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .step-number {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-right: 12px;
        }
        .divider {
            position: relative;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
        }
        .feature-icon {
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            margin-bottom: 16px;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:py-32">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-4">Kafka消息传递机制</h1>
                    <p class="text-xl text-gray-100 mb-8">深入解析分布式消息系统的核心原理与设计思想</p>
                    <div class="flex space-x-4">
                        <a href="#message-flow" class="bg-white text-indigo-700 hover:bg-gray-100 px-6 py-3 rounded-lg font-medium transition duration-300 flex items-center">
                            <i class="fas fa-arrow-down mr-2"></i> 开始探索
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <div class="bg-white bg-opacity-20 p-6 rounded-2xl backdrop-filter backdrop-blur-sm border border-white border-opacity-20">
                        <div class="mermaid">
                            graph LR
                            A[Producer] -->|发布消息| B[Topic]
                            B --> C[Partition 1]
                            B --> D[Partition 2]
                            B --> E[Partition 3]
                            C --> F[Consumer Group 1]
                            D --> G[Consumer Group 2]
                            E --> H[Consumer Group 3]
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Message Flow Section -->
    <section id="message-flow" class="py-16 px-4 bg-white">
        <div class="container mx-auto max-w-6xl">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold mb-4 text-gray-800">消息传递过程</h2>
                <div class="w-20 h-1 bg-indigo-500 mx-auto"></div>
            </div>
            
            <div class="flex justify-center mb-12">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709520093034-e3c2072e-30b2-4b34-a578-9bfa916f4290.png" alt="消息传递流程图" class="rounded-lg shadow-lg max-w-full h-auto">
            </div>
            
            <div class="grid md:grid-cols-1 gap-6">
                <div class="bg-gray-50 p-6 rounded-xl">
                    <div class="flex items-start mb-4">
                        <div class="step-number bg-indigo-100 text-indigo-600 font-bold">1</div>
                        <p class="flex-1">生产者将消息发送到指定的Topic。</p>
                    </div>
                </div>
                <div class="bg-gray-50 p-6 rounded-xl">
                    <div class="flex items-start mb-4">
                        <div class="step-number bg-indigo-100 text-indigo-600 font-bold">2</div>
                        <p class="flex-1">Kafka集群中的Broker接收到消息后，根据Topic和Partition的配置，将消息写入相应的分区中。</p>
                    </div>
                </div>
                <div class="bg-gray-50 p-6 rounded-xl">
                    <div class="flex items-start mb-4">
                        <div class="step-number bg-indigo-100 text-indigo-600 font-bold">3</div>
                        <p class="flex-1">消费者从指定的Topic订阅消息，消费者组中的消费者从不同的分区中消费消息。</p>
                    </div>
                </div>
                <div class="bg-gray-50 p-6 rounded-xl">
                    <div class="flex items-start mb-4">
                        <div class="step-number bg-indigo-100 text-indigo-600 font-bold">4</div>
                        <p class="flex-1">每个消费者维护自己消费的Offset（偏移量），记录已经消费的消息位置，Kafka根据Offset保证消息的顺序和可靠性。</p>
                    </div>
                </div>
                <div class="bg-gray-50 p-6 rounded-xl">
                    <div class="flex items-start mb-4">
                        <div class="step-number bg-indigo-100 text-indigo-600 font-bold">5</div>
                        <p class="flex-1">消费者定期向Kafka提交Offset的位置，以便Kafka知道哪些消息已经被消费，哪些还未被消费。</p>
                    </div>
                </div>
            </div>
            
            <p class="mt-8 text-gray-600 text-center max-w-3xl mx-auto">
                通过这样的消息传递流程，Kafka实现了高效、可靠的消息传输，支持大规模的消息处理和分发。Kafka的消息传递主要依赖于以下几个组件以及它们的作用如下。
            </p>
        </div>
    </section>

    <!-- Components Section -->
    <section class="py-16 px-4 bg-gray-50">
        <div class="container mx-auto max-w-6xl">
            <!-- Producer -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-16 card-hover">
                <div class="md:flex">
                    <div class="md:w-1/3 p-8 bg-indigo-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709520292693-47b6d987-f574-4cb2-a614-0df95af25d29.png" alt="Producer" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Producer</h3>
                        <p class="text-gray-600 mb-6">Producer负责将消息从数据源发送到Kafka集群，保证消息的可靠传递和正确路由。</p>
                        
                        <div class="space-y-4">
                            <div class="flex items-start">
                                <div class="feature-icon bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-paper-plane text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息发送者</h4>
                                    <p class="text-gray-600">Producer负责将消息发送到Kafka集群中的指定Topic中。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-cogs text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息生产者</h4>
                                    <p class="text-gray-600">Producer生成消息并将其发布到Kafka集群。它可以是任何生产者应用程序，如Web服务器、传感器、日志文件等。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-code-branch text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息分区</h4>
                                    <p class="text-gray-600">Producer可以选择将消息发送到指定的分区，也可以让Kafka根据配置选择合适的分区。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Broker -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-16 card-hover">
                <div class="md:flex flex-row-reverse">
                    <div class="md:w-1/3 p-8 bg-purple-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709520374257-100ebc64-d78c-4b0b-8a2f-bd2785680532.png" alt="Broker" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Broker</h3>
                        <p class="text-gray-600 mb-6">Broker负责存储、路由、处理和管理消息，保证消息能够高效、可靠地在集群中传递和处理。</p>
                        
                        <div class="space-y-4">
                            <div class="flex items-start">
                                <div class="feature-icon bg-purple-100 text-purple-600">
                                    <i class="fas fa-database text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息存储</h4>
                                    <p class="text-gray-600">Broker存储所有传入的消息，并根据需要将它们持久化到磁盘上。这使得Kafka能够处理大量的消息并保持高性能。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-purple-100 text-purple-600">
                                    <i class="fas fa-route text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息路由</h4>
                                    <p class="text-gray-600">Broker负责将来自Producer的消息路由到正确的Topic和Partition中，并确保消息按照指定的顺序进行存储和传递。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-purple-100 text-purple-600">
                                    <i class="fas fa-tasks text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息处理</h4>
                                    <p class="text-gray-600">Broker处理来自Producer的消息，包括接收、写入、复制、压缩、索引和存储等操作，以及处理来自Consumer的拉取请求。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Topic -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-16 card-hover">
                <div class="md:flex">
                    <div class="md:w-1/3 p-8 bg-blue-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709520484744-c86ed4bc-bcb0-403a-8aa4-a7fd59b126bb.png" alt="Topic" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Topic</h3>
                        <p class="text-gray-600 mb-6">Topic在Kafka中起着消息分类、存储、发布、订阅、路由和复制等重要作用，是Kafka消息传递的核心组件之一。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div class="flex items-start">
                                <div class="feature-icon bg-blue-100 text-blue-600">
                                    <i class="fas fa-tags text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息分类</h4>
                                    <p class="text-gray-600">Topic是消息的逻辑分类，将相关的消息分组到一个Topic中，便于对消息进行管理和处理。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-blue-100 text-blue-600">
                                    <i class="fas fa-save text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息存储</h4>
                                    <p class="text-gray-600">Topic负责存储Producer发送的消息。每个Topic都包含一个或多个Partition，消息在Partition中按顺序存储。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-blue-100 text-blue-600">
                                    <i class="fas fa-upload text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息发布</h4>
                                    <p class="text-gray-600">Producer将消息发送到指定的Topic中，Kafka将根据消息的键（Key）来确定消息应该存储在哪个Partition中。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-blue-100 text-blue-600">
                                    <i class="fas fa-download text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息订阅</h4>
                                    <p class="text-gray-600">Consumer通过订阅Topic来接收消息。Consumer可以订阅一个或多个Topic，并从指定的Partition中拉取消息。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Partition -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-16 card-hover">
                <div class="md:flex flex-row-reverse">
                    <div class="md:w-1/3 p-8 bg-green-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709520539478-74157259-8073-44d7-aaa4-d21fd20e17db.png" alt="Partition" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Partition</h3>
                        <p class="text-gray-600 mb-6">Partition在Kafka中起着消息存储、并行处理、负载均衡、消息复制和容错、消息顺序性等重要作用，是Kafka消息传递的关键组件之一。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div class="flex items-start">
                                <div class="feature-icon bg-green-100 text-green-600">
                                    <i class="fas fa-server text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息存储</h4>
                                    <p class="text-gray-600">每个Partition都是一个有序的消息日志，用于存储特定Topic的消息数据。消息按顺序追加到Partition中，并且保留了消息的插入顺序。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-green-100 text-green-600">
                                    <i class="fas fa-layer-group text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">并行处理</h4>
                                    <p class="text-gray-600">消息被分发到不同的Partition中，允许多个Consumer实例并行地消费同一个Topic的消息，从而提高了消息处理的吞吐量和并发性能。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-green-100 text-green-600">
                                    <i class="fas fa-balance-scale text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">负载均衡</h4>
                                    <p class="text-gray-600">Kafka使用Partition来实现消息的负载均衡。消息被分布到不同的Partition中，消费者可以并行地消费消息，从而实现了集群范围内的负载均衡。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-green-100 text-green-600">
                                    <i class="fas fa-copy text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消息复制和容错</h4>
                                    <p class="text-gray-600">每个Partition可以配置多个副本（Replica），副本存储在不同的Broker上，以确保消息的高可靠性和容错性。如果一个Broker故障，其他副本可以接替工作。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Leader和Follower -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-16 card-hover">
                <div class="md:flex">
                    <div class="md:w-1/3 p-8 bg-yellow-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709521094249-de434bf7-2e78-433e-8735-45e2bb59bbdd.png" alt="Leader和Follower" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Leader和Follower</h3>
                        <p class="text-gray-600 mb-6">在Kafka的消息传递过程中，Leader负责处理所有的读写请求和数据复制工作，而Follower是Leader的备份副本，用于提供数据的冗余和容错能力。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div class="bg-gray-50 p-5 rounded-lg">
                                <div class="flex items-center mb-3">
                                    <div class="feature-icon bg-yellow-100 text-yellow-600">
                                        <i class="fas fa-crown text-xl"></i>
                                    </div>
                                    <h4 class="font-bold text-gray-800 ml-3">Leader</h4>
                                </div>
                                <ul class="space-y-2 text-gray-600">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>每个Partition都有一个Leader，负责处理所有的读写请求。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>所有的生产者和消费者都与Leader进行交互。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>Leader负责将消息追加到日志中，并处理所有的读写请求。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>Leader还负责将数据复制到Follower副本中，以确保数据的可靠性和容错性。</span>
                                    </li>
                                </ul>
                            </div>
                            <div class="bg-gray-50 p-5 rounded-lg">
                                <div class="flex items-center mb-3">
                                    <div class="feature-icon bg-yellow-100 text-yellow-600">
                                        <i class="fas fa-users text-xl"></i>
                                    </div>
                                    <h4 class="font-bold text-gray-800 ml-3">Follower</h4>
                                </div>
                                <ul class="space-y-2 text-gray-600">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>Follower是Leader的备份副本，它们复制Leader的所有数据。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>Follower通常位于不同的Broker节点上，以提供高可用性和容错性。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>Follower定期从Leader同步数据，保持与Leader数据的一致性。</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-yellow-500 mt-1 mr-2 text-sm"></i>
                                        <span>当Leader发生故障时，Follower可以被选举为新的Leader，以继续提供服务。</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Consumer Group -->
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                <div class="md:flex flex-row-reverse">
                    <div class="md:w-1/3 p-8 bg-red-50 flex items-center justify-center">
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709521188805-ce1305f8-9da4-47d3-807b-fc87cd4eb630.png" alt="Consumer Group" class="w-full h-auto max-w-xs">
                    </div>
                    <div class="md:w-2/3 p-8">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">Consumer Group</h3>
                        <p class="text-gray-600 mb-6">消费者组使得多个消费者可以协同工作，实现并行处理和负载均衡，从而更有效地消费Kafka主题中的消息。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div class="flex items-start">
                                <div class="feature-icon bg-red-100 text-red-600">
                                    <i class="fas fa-fast-forward text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">并行消费</h4>
                                    <p class="text-gray-600">消费者组允许多个消费者并行消费同一个主题（Topic）的消息，消费者组内的消费者可以分摊同一主题的消息负载，提高消息处理的效率和吞吐量。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-red-100 text-red-600">
                                    <i class="fas fa-weight text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">负载均衡</h4>
                                    <p class="text-gray-600">Kafka会将一个主题中的分区（Partition）分配给消费者组中的消费者，消费者组内的消费者负责消费各自分配到的分区，以实现负载均衡。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-red-100 text-red-600">
                                    <i class="fas fa-heartbeat text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">消费者失效处理</h4>
                                    <p class="text-gray-600">当消费者失效或退出时，Kafka会将其分配的分区重新分配给其他存活的消费者，这样可以确保即使有消费者失败，整个消费者组仍然能够继续消费消息。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="feature-icon bg-red-100 text-red-600">
                                    <i class="fas fa-expand text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <h4 class="font-bold text-gray-800">水平扩展</h4>
                                    <p class="text-gray-600">可以通过增加消费者实例来扩展消费者组，以处理更多的消息和提高并行处理能力。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Summary Section -->
    <section class="py-16 px-4 bg-indigo-50">
        <div class="container mx-auto max-w-6xl">
            <div class="text-center mb-12">
                <h2 class="text-3xl font-bold mb-4 text-gray-800">Kafka核心组件关系图</h2>
                <p class="text-gray-600 max-w-2xl mx-auto">以下是Kafka各核心组件之间的交互关系和消息传递流程的可视化展示</p>
            </div>
            
            <div class="bg-white p-8 rounded-xl shadow-md">
                <div class="mermaid">
                    graph TB
                    subgraph Producer
                    P[Producer] -->|发布消息| T[Topic]
                    end
                    
                    subgraph Kafka Cluster
                    T -->|包含| PT1[Partition 1]
                    T -->|包含| PT2[Partition 2]
                    T -->|包含| PT3[Partition 3]
                    
                    PT1 -->|Leader| B1[Broker 1]
                    PT1 -->|Follower| B2[Broker 2]
                    PT1 -->|Follower| B3[Broker 3]
                    
                    PT2 -->|Leader| B2[Broker 2]
                    PT2 -->|Follower| B1[Broker 1]
                    PT2 -->|Follower| B3[Broker 3]
                    end
                    
                    subgraph Consumer Group
                    CG1[Consumer 1] -->|消费| PT1
                    CG2[Consumer 2] -->|消费| PT2
                    CG3[Consumer 3] -->|消费| PT3
                    end
                </div>
            </div>
            
            <div class="mt-12 bg-white p-8 rounded-xl shadow-md">
                <h3 class="text-2xl font-bold text-gray-800 mb-6">Kafka核心设计思想</h3>
                <div class="grid md:grid-cols-3 gap-8">
                    <div class="flex flex-col">
                        <div class="flex items-center mb-4">
                            <div class="bg-indigo-100 text-indigo-600 p-3 rounded-lg mr-4">
                                <i class="fas fa-bolt text-xl"></i>
                            </div>
                            <h4 class="font-bold text-gray-800">高性能</h4>
                        </div>
                        <p class="text-gray-600">通过分区、批量处理和零拷贝等技术实现高吞吐量和低延迟的消息传递。</p>
                    </div>
                    <div class="flex flex-col">
                        <div class="flex items-center mb-4">
                            <div class="bg-indigo-100 text-indigo-600 p-3 rounded-lg mr-4">
                                <i class="fas fa-shield-alt text-xl"></i>
                            </div>
                            <h4 class="font-bold text-gray-800">高可靠</h4>
                        </div>
                        <p class="text-gray-600">通过副本机制、ISR集合和消息确认机制确保数据的持久性和可靠性。</p>
                    </div>
                    <div class="flex flex-col">
                        <div class="flex items-center mb-4">
                            <div class="bg-indigo-100 text-indigo-600 p-3 rounded-lg mr-4">
                                <i class="fas fa-expand-arrows-alt text-xl"></i>
                            </div>
                            <h4 class="font-bold text-gray-800">水平扩展</h4>
                        </div>
                        <p class="text-gray-600">支持通过增加Broker节点和分区数量实现系统的水平扩展，满足业务增长需求。</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12 px-4">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                    <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition duration-300">
                        http://www.yuque.com/jtostring
                    </a>
                </div>
                <div class="flex space-x-6">
                    <a href="#" class="text-gray-400 hover:text-white transition duration-300">
                        <i class="fab fa-github text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-300">
                        <i class="fab fa-twitter text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-300">
                        <i class="fab fa-linkedin text-xl"></i>
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500 text-sm">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```